<div class="test" >
	<div class="formContainer" >
		<?php $this->displayFormErrors();	?>
		<form  method="post" action="<?php echo $this->url(array('ctrl' => 'UserTests','act' => 'result'))?>" >
			<fieldset class="ui-widget ui-widget-content ui-corner-all">
			<?php
				if($this->testDetails):
					foreach ($this->testDetails as $testId => $testDetails):
						?>
							<input type="hidden"  name="testId" value="<?php echo $testId;?>" />
							<legend class="ui-widget ui-widget-header ui-corner-all"><?php echo $this->escape($testDetails['title']);?></legend>
							<ul class="questions" >
						<?php
						unset($testDetails['title']);
						$qCounter = 1;
						foreach ($testDetails as $qId => $qDetails):
							?>
								<li>
									<?php echo $qCounter++.')&nbsp;<strong>'.$this->escape($qDetails['title']).'</strong>';?>
									<ul class="answers" >
							<?php
								unset($qDetails['title']);
								$ansCounter = 1;
								foreach ($qDetails as $ansDetails):
									?>
										<li>
											<input id="ans<?php echo $ansDetails['ansId']?>"  name="qId<?php echo $qId?>"  type="radio" value="<?php echo $ansDetails['ansId']?>" />
											<label for="ans<?php echo $ansDetails['ansId']?>" ><?php echo $ansCounter++.')&nbsp;'.$this->escape($ansDetails['title']);?></label>
										</li>
									<?php
								endforeach;
							?></ul></li><?php
						endforeach;
					endforeach;
				endif;
			?>
				</ul >
				<p>
					<input class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" type="submit" value="Send Answers" />
				</p>
			</fieldset>
		</form>
	</div>
</div>
